<style type="text/css">
    .scroll-list{

    }
    .scroll-list ul{
        height: 300px;
    }
    .scroll-list ul li{
        border-top: 1px dashed #333;
        padding: 5px;
        cursor: pointer;
        list-style-type: none;
    }
    .scroll-list ul li:hover{
        background-color: #BABABA;
        color: #000000;
    }
    .scroll-list ul li.restrict,.scroll-list ul li.restrict:hover{
        background-color: #ffffff;
        color: #e5a6a6;
        cursor: not-allowed;
    }
    .scroll-list ul li.selected{
        background-color: #D1D1D1;
        color: #000000;
    }
    .widgetcontent p.error{
        color: #ff1f15;
    }
    .ui-datepicker-trigger{
        vertical-align: middle;
        width: auto;
        cursor: pointer;
    }
    input[disabled] {
       background-color: #ffffff;
    }
</style>
<div class="row-fluid">

    <div class="span6 profile-left">
        <div class="widgetbox" id="widget_contacts_sms">
            <div class="headtitle">
                <h4 class="widgettitle">Contacts Numbers</h4>
            </div>
            <div class="widgetcontent">
                <p class="error" style="display: none"></p>
                <form class="stdform">
                    <p>Type multiple contact numbers separated by a comma ( , )</p>
                    <p>
                        <span class="field" style="margin-left: 0px;">
                            <textarea id="sms_contacts"  rows="9" class="span12" placeholder="2331234567892,2339847635263,2339475172839"></textarea>
                        </span>
                    </p>
                    <!--<p class="stdformbutton" style="margin-left: 0px;">
                        <button type="button" id="send_sms_btn" class="btn btn-primary">Send SMS Now</button>
                        <button type="button" id="send_sms_later_btn" class="btn btn-inverse">Send SMS Later</button>
                    </p>-->
                </form>
            </div>
        </div>
    </div><!--span4-->
    <div class="span6 profile-left">
        <div class="widgetbox" id="widget_sms">
            <div class="headtitle">
                <h4 class="widgettitle">SMS Message</h4>
            </div>
            <div class="widgetcontent">
                <p class="error" style="display: none"></p>
                <form class="stdform">
                    <p>Sender ID (Up To 11 Alphanumeric Characters)</p>
                    <p>
                        <span class="field" style="margin-left: 0px;">
                            <input type="text" id="sender_id" class="span12" maxlength="11"/>
                        </span>
                    </p>
                    <p>Type Message Here</p>
                    <p>
                        <span class="field" style="margin-left: 0px;">
                            <textarea id="sms_txt"  rows="5" class="span12"></textarea>
                        </span>
                    </p>

                    <p class="stdformbutton" style="margin-left: 0px;">
                        <button type="button" id="send_sms_btn" class="btn btn-primary">Send SMS Now</button>
                        <button type="button" id="send_sms_later_btn" class="btn btn-inverse">Send SMS Later</button>
                    </p>
                </form>
            </div>
        </div>
    </div><!--span4-->

</div><!--row-fluid-->



<div id="sms_schedule_modal" class="modal hide fade">
    <form class="form form-horizontal" method="post" action="" enctype="" style="margin: 0px;">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4>Select Date And Time For The Schedule</h4>
        </div>
        <div class="modal-body" style="height: 220px;">
            <div class="control-group">
                <?php
                $time_10_min = date("H:i",strtotime('+10 minutes',strtotime(date("H:i"))));
                $now_day = date('d');
                $now_month = date('m');
                $now_year = date('Y');
                ?>
                <label class="control-label" for="password"><strong>Schedule Date:</strong></label>
                <div class="controls">
                    <select id="schedule_day" class="span1" style="float: left">
                        <?php foreach($days_opt as $key=>$value) {
                            $selected = $key == $now_day ? 'selected':'';
                            ?>
                            <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo $value; ?></option>
                        <?php } ?>
                    </select>
                    <select id="schedule_month" class="span2" style="float: left">
                        <?php foreach($month_opt as $key=>$value) {
                            $selected = $key == $now_month ? 'selected':'';
                            ?>
                            <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo $value; ?></option>
                        <?php } ?>
                    </select>
                    <select id="schedule_year" class="span1" style="float: left">
                        <?php foreach($year_opt as $key=>$value) {
                            $selected = $key == $now_year ? 'selected':'';
                            ?>
                            <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo $value; ?></option>
                        <?php } ?>
                    </select>
                    <!--<input id="schedule_date" type="text" name="date" class="input-small" disabled />-->
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="password"><strong>Schedule Time:</strong></label>
                <div class="controls">
                    <div class="input-append bootstrap-timepicker">
                        <select id="schedule_time" class="span2" style="float: ">
                            <?php foreach($time_opt as $key=>$value) {
                                //$selected = $key == $time_10_min ? 'selected':'';
                                ?>
                                <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
                            <?php } ?>
                        </select>
                        <!-- <input id="schedule_time" type="text" class="input-small" disabled/>
                         <span class="add-on btn"><i class="iconfa-time"></i> Click Here For Time</span>-->
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" id="sms_schedule_modal_btn" class="btn btn-primary">Schedule SMS</button>
            <a href="#sms_schedule_modal" class="btn" data-toggle="modal" id="close-sms_schedule_modal">Close</a>
        </div>
    </form>
</div>



<!-- URLs -->
<input type="hidden" id="do-sms-url" value="<?php echo $this->Html->url(array('controller' => 'Sms', 'action' => 'single_sms')); ?>" />

<!-- Le Script -->
<script type="application/javascript">
    var local_sms_per_unit_cost = <?php echo json_encode($local_sms_per_unit_cost); ?>;
    var inter_sms_per_unit_cost = <?php echo json_encode($inter_sms_per_unit_cost); ?>;
    var sms_per_unit_count = <?php echo json_encode($sms_per_unit_count); ?>;
    var credit_balance = <?php echo json_encode($credit_balance); ?>;
</script>
<?php
    echo $this->Html->script('scripts/sms/single_sms.js');
?>
